<template>
  <div @click="onAdd(meg)">
    <img :src="imgurl" alt="">
    <p>{{meg}}</p>
  </div>
</template>

<script>
export default {
  props: ['imgurl', 'meg'],
  data () {
    return {

    }
  },

  created () {

  },

  methods: {
    onAdd (m) {
      this.$emit('onAdd', m)
    }
  }
}
</script>

<style scoped lang='less'>
div{
  width: 200px;
  height: 300px;
  display: inline-block;
  border: 1px solid orange;
  img{
    width: 100%;
    height: 200px;
  }
}
</style>
